Simulator

RSS for tag

Rapidly prototype and test builds of your app during the development process using Simulator.

Posts under Simulator tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Resolving a "Simulator runtime is not available" error
Some Macs recently received a macOS system update which disabled the simulator runtimes used by Xcode 15, including the simulators for iOS, tvOS, watchOS, and visionOS. If your Mac received this update, you will receive the following error message and will be unable to use the simulator: The com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime is not available. Domain: com.apple.CoreSimulator.SimError Code: 401 Failure Reason: runtime profile not found using "System" match policy Recovery Suggestion: Download the com.apple.CoreSimulator.SimRuntime.iOS-17-2 simulator runtime from the Xcode To resume using the simulator, please reboot your Mac. After rebooting, check Xcode Preferences → Platforms to ensure that the simulator runtime you would like to use is still installed. If it is missing, use the Get button to download it again. The Xcode 15.3 Release Notes are also updated with this information.
0
0
526
4w
How do I exclude linking a library for simulator builds
I have a third party library added to my project as ThirdParty.framework, but it only supports real device. I want to make my project still build for simulators but exclude this library and any references of importing it. I tried a few things, for example in the target's build phase "Link Binary With Libraries" set this framework as "Optional", and in the code I have: #if !targetEnvironment(simulator) import ThirdParty class SomeClass: ProtocolFromThirdParty { // ... } #endif Also some view that has reference to this class: import SwiftUI #if targetEnvironment(simulator) struct TestViewSimulator: View { var body: some View { Text("See this view on real device") } } #else struct TestView: View { @StateObject var example = SomeClass() var body: some View { // ... } } #endif But still when I build for simulator, it still gives error for the linking issue: Building for 'iOS-simulator', but linking in object file (/<Path>/ThirdParty.framework/ThirdPartySDK[arm64][2](someobject.o)) built for 'iOS' Building to a real device works as expected. Any suggestions I could make it build on simulators? (I'd like to isolate this screen only for real device and not impacting other parts of the app)
1
0
56
14h
Issue Running iOS 17.4 Simulator in Xcode with Flutter always say to download 17.5
Issue Running iOS 17.4 Simulator in Xcode with Flutter Hello everyone, I'm currently facing an issue with running my Flutter app on an iOS 17.4 simulator. Even though I have iOS 17.4 installed, Xcode and Flutter are insisting that I need to download and use iOS 17.5, which I do not want to do due to specific project requirements. The Problem When I attempt to run my app using the iOS 17.4 simulator, I receive the following error: Failed to build iOS app Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:30CEF98C-F08B-4CC9-8662-6A73B903E922 } Ineligible destinations for the "Runner" scheme: { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.5 is not installed. To use with Xcode, first download and install the platform } Additionally, Xcode keeps prompting me to download iOS 17.5. However, when I attempt to download it, it consumes a lot of data and eventually fails with the message: iOS 17.5 Simulator - Failed - Registering simulator runtime with CoreSimulator failed to download Steps I've Taken but issue not solved so hey there please help me Verified Installed Runtimes in Xcode: Opened Xcode and navigated to Xcode > Settings > Platforms. Confirmed that iOS 17.4 is listed and installed. Checked and Updated Podfile: Edited ios/Podfile to set the platform to iOS 17.4: platform :ios, '17.4' Reinstalled pods: cd ios pod install cd .. ``` Cleaned Flutter and iOS Build Artifacts: > flutter clean 4. **Opened the iOS Project in Xcode:** - Ensured the deployment target is set to 17.4 for all configurations. - Selected the iPhone 15 Pro (iOS 17.4) simulator from the device menu. 5. **Built Directly in Xcode:** - Built the project by selecting `Product` > `Build` from the Xcode menu and addressed any errors. 6. **Reset Simulators:** - Deleted all simulators and recreated the iPhone 15 Pro with iOS 17.4: ```sh xcrun simctl delete all xcrun simctl create "iPhone 15 Pro" com.apple.CoreSimulator.SimDeviceType.iPhone-15-Pro com.apple.CoreSimulator.SimRuntime.iOS-17-4 ``` 7. **Verified Available Devices and Ran Again:** - Listed available devices: ```sh flutter devices ``` - Ran the app specifying the correct device ID: ```sh flutter run -d 30CEF98C-F08B-4CC9-8662-6A73B903E922 ``` 8. **Updated Flutter and Xcode:** - Ensured both Flutter SDK and Xcode are updated to their latest versions: ```sh flutter upgrade ``` 9. **Ran Flutter Doctor:** - Diagnosed any underlying issues: ```sh flutter doctor ``` #### Request for Help Despite these efforts, I am still unable to run my Flutter app on the iOS 17.4 simulator. Xcode continues to prompt for iOS 17.5, and the download consistently fails, consuming significant data. I am looking for a solution that allows me to use the iOS 17.4 simulator without having to upgrade to iOS 17.5. If anyone has encountered this issue or has any suggestions on how to resolve it, your help would be greatly appreciated! i am getting this in terminal, flutter run Launching lib/main.dart on iPhone 15 Pro in debug mode... Updating project for Xcode compatibility. Upgrading project.pbxproj Upgrading Runner.xcscheme Running pod install... 1,064ms Running Xcode build... Xcode build done. 1.9s Failed to build iOS app Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { id:FBAFE907-664B-4D4F-833F-B9E58B0B944A } Ineligible destinations for the "Runner" scheme: { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.5 is not installed. To use with Xcode, first download and install the platform } ════════════════════════════════════════════════════════════════════════════════ iOS 17.5 is not installed. To download and install the platform, open Xcode, select Xcode > Settings > Platforms, and click the GET button for the required platform. For more information, please visit: https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes ════════════════════════════════════════════════════════════════════════════════ Could not build the application for the simulator. Error launching application on iPhone 15 Pro.
1
0
366
6d
Trouble Verifying XCode Sideloaded Apps
I am working on a home automation app that runs fine through the XCode simulator, that I would love to get up and running on my personal device. When I load it from my computer on my device I am prompted to "trust" myself as a developer, which I have done. I am also prompted with a new message to 'verify' the app. I can't successfully do this. I am given a message that tells me to check my connection (I am connected to both cellular and Wifi - same as my Mac). What are some possible solutions, without paying for a full developer license?
0
0
176
1w
After upgrading the mac to the latest version, simulator(17.4.1) getting crash in every few minutes after launch or hangs and nothing works
Incident Identifier: 8C757080-1227-4FF8-9563-D4AAFE0587BE CrashReporter Key: ACD5C28C-DD36-0D52-56E8-477D2887C6A8 Hardware Model: MacBookAir9,1 Process: Runner [52298] Path: /Users/USER/Library/Developer/CoreSimulator/Devices/E4009C5D-4435-4F7F-BD7E-140632A9CF45/data/Containers/Bundle/Application/88AF44ED-BA26-420D-B011-BA09712D1A56/Runner.app/Runner Identifier: com.test.AppName Version: 1.0.0 (1) Code Type: X86-64 (Native) Role: Foreground Parent Process: launchd_sim [45746] Coalition: com.apple.CoreSimulator.SimDevice.E4009C5D-4435-4F7F-BD7E-140632A9CF45 [25888] Responsible Process: SimulatorTrampoline [45605] Date/Time: 2024-05-21 18:03:39.1450 +0530 Launch Time: 2024-05-21 17:55:53.3837 +0530 OS Version: macOS 14.5 (23F79) Release Type: User Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Terminating Process: Runner [52298] Triggered by Thread: 0 Last Exception Backtrace: 0 CoreFoundation 0x7ff8004cd561 __exceptionPreprocess + 226 1 libobjc.A.dylib 0x7ff8000837e8 objc_exception_throw + 48 2 CoreFoundation 0x7ff8004cd44f -[NSException initWithCoder:] + 0 3 Runner 0x1043430ed -[GIDSignIn signInWithOptions:] + 173 (GIDSignIn.m:513) 4 Runner 0x104341ee0 -[GIDSignIn signInWithPresentingViewController:hint:additionalScopes:completion:] + 208 (GIDSignIn.m:264) 5 Runner 0x104ed66e8 -[FLTGoogleSignInPlugin signInWithHint:additionalScopes:completion:] + 184 (FLTGoogleSignInPlugin.m:252) 6 Runner 0x104ed54b5 -[FLTGoogleSignInPlugin signInWithCompletion:] + 901 (FLTGoogleSignInPlugin.m:152) 7 Runner 0x104edaf58 __FSIGoogleSignInApiSetup_block_invoke.175 + 168 (messages.g.m:266) 8 Flutter 0x10e0643df __48-[FlutterBasicMessageChannel setMessageHandler:]_block_invoke + 171 9 Flutter 0x10da1d0e1 invocation function for block in flutter::PlatformMessageHandlerIos::HandlePlatformMessage(std::_fl::unique_ptr<flutter::PlatformMessage, std::_fl::default_deleteflutter::PlatformMessage>) + 94 10 libdispatch.dylib 0x7ff8001783ec _dispatch_call_block_and_release + 12 11 libdispatch.dylib 0x7ff8001796d8 _dispatch_client_callout + 8 12 libdispatch.dylib 0x7ff80018848c _dispatch_main_queue_drain + 1420 13 libdispatch.dylib 0x7ff800187ef2 _dispatch_main_queue_callback_4CF + 31 14 CoreFoundation 0x7ff800429b34 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 15 CoreFoundation 0x7ff80042446f __CFRunLoopRun + 2463 16 CoreFoundation 0x7ff8004236ed CFRunLoopRunSpecific + 557 17 GraphicsServices 0x7ff8103ba08f GSEventRunModal + 137 18 UIKitCore 0x7ff805cdf6ee -[UIApplication _run] + 972 19 UIKitCore 0x7ff805ce416e UIApplicationMain + 123 20 Runner 0x1041cb10f main + 63 (AppDelegate.swift:5) 21 dyld_sim 0x107d023e0 start_sim + 10 22 dyld 0x10d902366 start + 1942 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x107e4914a __pthread_kill + 10 1 libsystem_pthread.dylib 0x107eaaebd pthread_kill + 262 2 libsystem_c.dylib 0x7ff80016dd1c abort + 133 3 libc++abi.dylib 0x7ff8002c6d12 abort_message + 241 4 libc++abi.dylib 0x7ff8002b951a demangling_terminate_handler() + 266 5 libobjc.A.dylib 0x7ff800061fba _objc_terminate() + 96 6 libc++abi.dylib 0x7ff8002c616b std::__terminate(void (*)()) + 6 7 libc++abi.dylib 0x7ff8002c6126 std::terminate() + 54 8 libdispatch.dylib 0x7ff8001796ec _dispatch_client_callout + 28 9 libdispatch.dylib 0x7ff80018848c _dispatch_main_queue_drain + 1420 10 libdispatch.dylib 0x7ff800187ef2 _dispatch_main_queue_callback_4CF + 31 11 CoreFoundation 0x7ff800429b34 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 12 CoreFoundation 0x7ff80042446f __CFRunLoopRun + 2463 13 CoreFoundation 0x7ff8004236ed CFRunLoopRunSpecific + 557 14 GraphicsServices 0x7ff8103ba08f GSEventRunModal + 137 15 UIKitCore 0x7ff805cdf6ee -[UIApplication _run] + 972 16 UIKitCore 0x7ff805ce416e UIApplicationMain + 123 17 Runner 0x1041cb10f main + 63 (AppDelegate.swift:5) 18 dyld_sim 0x107d023e0 start_sim + 10 19 dyld 0x10d902366 start + 1942 Thread 1:: com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x107e423ce mach_msg2_trap + 10 1 libsystem_kernel.dylib 0x107e50c88 mach_msg2_internal + 84 2 libsystem_kernel.dylib 0x107e49510 mach_msg_overwrite + 653 3 libsystem_kernel.dylib 0x107e426bd mach_msg + 19 4 CoreFoundation 0x7ff8004298a3 __CFRunLoopServiceMachPort + 143 5 CoreFoundation 0x7ff80042402b __CFRunLoopRun + 1371 6 CoreFoundation 0x7ff8004236ed CFRunLoopRunSpecific + 557 7 Foundation 0x7ff800ea8c9a -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213 8 Foundation 0x7ff800ea8f18 -[NSRunLoop(NSRunLoop) runUntilDate:] + 72 9 UIKitCore 0x7ff805dbc7aa -[UIEventFetcher threadMain] + 518 10 Foundation 0x7ff800ed34d5 NSThread__start + 1024 11 libsystem_pthread.dylib 0x107eab18b _pthread_start + 99 12 libsystem_pthread.dylib 0x107ea6ae3 thread_start + 15 AirPort: Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus USB Device: T2Bus USB Device: Touch Bar Backlight USB Device: Apple Internal Keyboard / Trackpad USB Device: Headset USB Device: Ambient Light Sensor USB Device: FaceTime HD Camera (Built-in) USB Device: Apple T2 Controller Thunderbolt Bus: MacBook Air, Apple Inc., 86.0
0
0
122
1w
Xcode 15.3+ bug: framework tests executed in fresh simulator fail to write data to disk
I have filed this as FB13722352. I am sharing it here because I haven't seen it mentioned anywhere online yet and am curious if anyone else has run into it. In Xcode 15.3+, writing data to disk fails when running the tests for a Framework project in a fresh simulator. Specifically, if the selected simulator has never been launched before (i.e. is newly-created), any test execution that attempts to write data into the NSDocumentDirectory directory will fail for a period of time after the simulator is first launched (I've observed between 10s and 20s). After that period of time, the same data write action will succeed. It appears that Xcode 15.3+ is starting test execution too soon, without waiting a sufficient amount of time for the Simulator to fully boot. This issue does not occur in Xcode 15.2 or prior versions. Since the issue only appears in a fresh (never-before booted) simulator, it is likely to pop up consistently in CI test runs (where simulators are not re-used). This can cause confusion because the same test would not fail locally when re-using an existing simulator. When the issue appears, the file write API returns the following error: Domain=NSCocoaErrorDomain Code=4 "The folder “testFile” doesn’t exist." UserInfo={NSFilePath=[...]/data/Documents/testFile, NSUserStringVariant=Folder, NSUnderlyingError= {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"} } Reproduction Steps: Open Xcode 15.3 or 15.4. Make sure Simulator.app is closed. Using the "Devices and Simulators" window, create a new iPhone 15 Pro simulator with iOS 17.4 (other devices and OS versions work as well). Do not launch this new simulator. Create a new Framework project and add a test that performs and then checks the output of a data write to the Document directory (see example test code below). Select the new simulator (created in step 2) as the test run target and run the test. Here's an example test that fails in the scenario outlined above: - (void)testBasicRepro { NSString *testString = @"Hello, World!"; NSData *data = [testString dataUsingEncoding:NSUnicodeStringEncoding]; // Get documents directory NSURL *url = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; NSURL *testFileURL = [url URLByAppendingPathComponent:@"testFile"]; // Write the data NSError *error; bool result = [data writeToURL:testFileURL options:NSDataWritingAtomic error:&error]; // Check if it was successful XCTAssertTrue(result); XCTAssertNil(error); XCTAssertTrue([[NSFileManager defaultManager] fileExistsAtPath:testFileURL.path]); } Workaround The workaround that I have come up with is to create a test that runs first (by disabling parallelization and randomization, and making sure the test class filename is alphabetically first). Alternatively, it could be called from the setUp method in any test files that are affected. This test performs a data write and checks the result in a loop in order to block until the data write succeeds (i.e. the Simulator is sufficiently booted for data write operations to complete). - (void)testWorkaroundBug { NSString *testString = @"Hello, World!"; NSData *data = [testString dataUsingEncoding:NSUnicodeStringEncoding]; NSError *error; // Get documents directory NSURL *documentsURL = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; NSURL *testFileURL; NSDate *startTime = [NSDate date]; NSLog(@"Starting test at %@", startTime); for (int i = 0; i < 120; i++) { // Create unique URL testFileURL = [documentsURL URLByAppendingPathComponent:[NSString stringWithFormat:@"testFile-%@", @(i)]]; // Write the data BOOL success = [data writeToURL:testFileURL options:NSDataWritingAtomic error:&error]; // Check if it exists if (success && [[NSFileManager defaultManager] fileExistsAtPath:testFileURL.path]) { NSLog(@"Test file %@ was created successfully! Elapsed time %@s", @(i), @(fabs([startTime timeIntervalSinceNow]))); return; } else { NSLog(@"Test file %@ was not created. Error: %@. Sleeping for 0.5s and trying again.", @(i), error); [NSThread sleepForTimeInterval:0.5]; } } }
1
0
158
1w
Can't establish mTLS on iOS with WKWebView and ProxyConfiguration
I have a sample iOS app in Xcode that I run in the iOS 17.5 Simulator. It creates a WKWebView and configures a proxy via the ProxyConfiguration API, it works as expected unless the proxy tries to establish mTLS. It seems there is no way to handle the client certificate request when using a proxy. If I navigate to a page that requests mTLS without a proxy configured, it works as expected. Here is a minimal repro: #import "ViewController.h" #import &lt;WebKit/WebKit.h&gt; @import Foundation; @import WebKit; @interface ViewController () &lt;WKNavigationDelegate&gt; @property (nonatomic,strong) WKWebView* webView; @property (nonatomic, strong) WKWebViewConfiguration * webConfig; @end @implementation ViewController - (void)loadView { [super loadView]; nw_protocol_options_t tls_options = nw_tls_create_options(); sec_protocol_options_t sec_options = nw_tls_copy_sec_protocol_options(tls_options); sec_protocol_options_set_challenge_block( sec_options, ^(sec_protocol_metadata_t metadata, sec_protocol_challenge_complete_t challenge_complete) { NSLog(@"Inside of challenge block"); challenge_complete(nil); }, dispatch_get_main_queue()); nw_endpoint_t proxy_endpoint = nw_endpoint_create_host(GetHost(), GetPort()); nw_relay_hop_t relay = nw_relay_hop_create(nil, proxy_endpoint, tls_options); nw_proxy_config_t proxy_config = nw_proxy_config_create_relay(relay, nil); nw_proxy_config_add_match_domain(proxy_config, "api.ipify.org"); self.webConfig = [[WKWebViewConfiguration alloc] init]; self.webConfig.websiteDataStore = [WKWebsiteDataStore nonPersistentDataStore]; self.webConfig.websiteDataStore.proxyConfigurations = @[ proxy_config ]; self.webView = [[WKWebView alloc] initWithFrame:self.view.frame configuration:self.webConfig]; self.webView.navigationDelegate = self; [self.view addSubview:self.webView]; } - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"%s",__func__); NSURL* url = [[NSURL alloc] initWithString:@"https://api.ipify.org"]; NSURLRequest* request = [[NSURLRequest alloc] initWithURL:url]; [self.webView loadRequest:request]; } - (void)webView:(WKWebView *)webView didStartProvisionalNavigation:(WKNavigation *)navigation { NSLog(@"%s",__func__); } - (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error { NSLog(@"%s. Error %@",__func__,error); } - (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler { NSLog(@"%s",__func__); NSLog(@"protection space: %@", challenge.protectionSpace.authenticationMethod); completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil); } @end The logs for this code show: -[ViewController viewDidLoad] -[ViewController webView:didStartProvisionalNavigation:] -[ViewController webView:didFailProvisionalNavigation:withError:]. Error Error Domain=NSURLErrorDomain Code=-1206 "The server “api.ipify.org” requires a client certificate." If we don't set up the ProxyConfiguration and navigate to a site that requires mTLS, the logs look like this: -[ViewController viewDidLoad] -[ViewController webView:didReceiveAuthenticationChallenge:completionHandler:] protection space: NSURLAuthenticationMethodServerTrust -[ViewController webView:didReceiveAuthenticationChallenge:completionHandler:] protection space: NSURLAuthenticationMethodClientCertificate -[ViewController webView:didStartProvisionalNavigation:] //... Eventually the request fails but the key difference is that didReceiveAuthenticationChallenge was invoked. When using the ProxyConfiguration neither that function nor the block we set via sec_protocol_options_set_challenge_block were run. I also tried to provide the client identity via sec_protocol_options_set_local_identity to no avail, and I've tried configuring these options too but they had no effect sec_protocol_options_add_tls_application_protocol(sec_options, "h2"); sec_protocol_options_set_max_tls_protocol_version(sec_options, tls_protocol_version_TLSv13); sec_protocol_options_set_peer_authentication_required(sec_options, true); Am I missing something? Or is this a bug in the ProxyConfiguration API?
0
1
236
2w
Trying to integrate Oracle Digital Assistant into an ios app
Hello fellow developers, We are trying to develop a chatbot application for ios devices using the powers of Oracle Digital Assistant. Main Documentation :- https://docs.oracle.com/en/cloud/paas/digital-assistant/use-chatbot/oracle-ios.html Implementation instructions :- https://blogs.oracle.com/digitalassistant/post/oracle-techexchange-using-the-oracle-ios-sdk-to-integrate-oracle-digital-assistant-in-mobile-applications The point is when we are trying to run the app, we are facing tons of warnings as in below screenshot. Here is the code for the ViewController.swift as below: // // ViewController.swift // ODA_Configure // // Created by Macbook on 15/05/24. // //import UIKit // //class ViewController: UIViewController { // // override func viewDidLoad() { // super.viewDidLoad() // // Do any additional setup after loading the view. // } // // //} // Import the SDK import UIKit import BotClientUISDK public class ViewController: UIViewController { // Declare a global BotsViewController variable in your app view controller class public var chatViewController: BotsViewController? public override func viewDidLoad() { super.viewDidLoad() // Obtain a shared instance of BotsViewController from BotsUIManager chatViewController = BotsUIManager.shared().viewControllerInstance() // Specify the color changes if any in a particular component. Make sure you set all the required colors in BotsProperties before adding the chat view to the view controller. // Add the chatViewController to your navigationController self.navigationController?.pushViewController(chatViewController!, animated: false) // Obtain a shared instance of BotsManager let botsManager = BotsManager.shared() // If you require access to callback methods provided in AuthenticationProvider. Make sure your class conforms to BotsMessageServiceDelegate // botsManager.authenticationTokenProvider = self let baseUrl = "idcs-oda-81e5e7409d52405784089abe830a8820-da12.data.digitalassistant.oci.oraclecloud.com" let channelID = "ff8a2d3f-7d65-4dab-a09a-d8f574ce5b7a" // Initialize a BotsConfiguration object and set feature flags if required. let botsConfiguration = BotsConfiguration(url: baseUrl , channelId: channelID) BotsManager.shared().connect(botsConfiguration: botsConfiguration) // Set the feature flag values if the desired values are different from the default values botsConfiguration.showConnectionStatus = true botsConfiguration.enableSpeechSynthesis = true botsConfiguration.disablePastActions = "none" // Initialize the configuration in botsViewController. Make sure you set all the feature flag values before passing the botsConfiguration to initConfiguration. chatViewController?.initConfiguration(botsConfiguration: botsConfiguration) // If you require access to callback methods provided in BotsMessageServiceDelegate. Make sure your class conforms to BotsMessageServiceDelegate //botsManager.delegate = self // If you require access to callback methods provided in BotsEventListener. Make sure your class conforms to BotsEventListener //botsManager.botsEventListener = self // Initialize and establish connection to the chat server BotsManager.shared().initialize(botsConfiguration: botsConfiguration, completionHandler: { (connectionStatus, error) in if error != nil { print ("Error: \(String(describing: error?.localizedDescription))") } else { print ("Connection Status: \(connectionStatus)") } }) } } After executing this code, we are getting the message as build succeeded , and this is the emulator, which happens to be blank white all the time. Possibly due the warning which I have posted above this seems to be the showstopper in the development. We are developing this for a prestigious client and would request an assistance as soon as possible. P.S :- We are using Xcode 15 with Simulator of version 17.0.
0
0
178
2w
Widgets not showing up on macOS
I am trying to bring my iOS App to native macOS. I am using exactly the same TimelineProvider and widgets (the ones not supported on macOS surrounded by #if(os)). Running the whole app or just the WidgetExtension on iOS works perfectly fine. Running the mac app works perfectly fine apart from missing Widgets. When running the WidgetExtension on My Mac, the WidgetKit Simulator opens and only presents Failed to load widget. The operation couldn't be completed. (WidgetKit_Simulator.WidgetDocument.Error error 4.) The code compiles fine without any warnings, only a file path is printed into the console. file:///Users/myName/Library/Developer/Xcode/DerivedData/MyAppName-dfsiuexplidieybwvbkqofchxirp/Build/Products/Debug/MyApp.app/Contents/PlugIns/MyAppNameWidgetExtensionExtension.appex/ Shortly after I get a log entry Logging Error: Failed to initialize logging system. Log messages may be missing. If this issue persists, try setting IDEPreferLogStreaming=YES in the active scheme actions environment variables. I am not sure which further Informationen I can give to solve my problem. Destinations on main App and Widget Extension is both set to Mac (no suffix). The mac is running 14.4.1 and Xcode 15.3. I am really thankful for any assistance you can give me to fix this problem. Thanks
1
1
186
2w
iOS 17.5 and Xcode 15.4 (Beta) simulator on device not working
Hello, im a new Apple developper since 2 years. I have Been working hard to learn and trying to publish my first IOS , iPad OS and Mac OS app. My app is taking form but I have few problems with the Xcode simulator to run ''on device'' for my iPad and iPhone. My devices began to disconnect and now I can't connect it anymore to run my code and debug. the are constantly in the state ''Trying to reconnect to '' and "preparing device". I have already reset all my device and deactivate developper mode etc. i have a iPad 7th gen and an iPhone 14 Pro Max . they both have iOS 17.5 beta 2 (trying to fix the problem by keeping those up to date as much as possible.) my Xcode version is 15.4 beta My Mac book air 13 inch 2018 is running Sonoma 14.4.1 and the is no new os version bus its not an apple M family chip. I think there is a Sonoma 14.5 beta version but for apple architecture. I really need your help plz
3
0
1.5k
2w
iOS simulator dyld/rpath/loader_path incorrectly set up by default?
I am trying to embed a framework and execute it on simulator: add framework, it is required by default, make it embed-and-sign If I start the app in simulator from XCode, all runs (by default it runs under debugger, so I assume a bit different environment). If I run it directly in simulator, using xcrun simctl, it crashes with framework binary not found (is that expected?). So I experimented [quite] a bit and updated the LOAD COMMAND to load the dylib with @loader_path (default is @rpath that xcode makes) - in such case the error is: Library not loaded: @loader_path/Frameworks/***.framework/*** Referenced from: <E13560A8-7387-308A-AF0F-F5107B737910> /Users/USER/Library/Developer/CoreSimulator/Devices/47B8C2D5-F78E-4976-B124-A25623DF14A7/data/Containers/Bundle/Application/5B5EA95D-44CD-4403-BE1E-FC6851B44917/App.app/App Reason: tried: '/Users/username/Library/Developer/CoreSimulator/Devices/47B8C2D5-F78E-4976-B124-A25623DF14A7/data/Containers/Bundle/Application/5B5EA95D-44CD-4403-BE1E-FC6851B44917/App.app/Frameworks/***.framework/***' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/***.framework/***' (no such file) (terminated at launch; ignore backtrace) /Users/username/Library/Developer/CoreSimulator/Devices/47B8C2D5-F78E-4976-B124-A25623DF14A7/data/Containers/Bundle/Application/5B5EA95D-44CD-4403-BE1E-FC6851B44917/App.app/Frameworks/***.framework/*** is a local path on my dev machine, which sounds like a bug. Is that a bug? Should I open one somewhere for Apple? Then I played a bit more and found this https://stackoverflow.com/a/52535580/21881034 - "All you need to do is set the third party frameworks you are using in your custom framework for e.g:- socket.io-client-swift as Optional instead of Required under Link binary with Libraries in build Phases section" - which worked. What it does is replaces the load command with LC_LOAD_WEAK_DYLIB - so I assume it executes a bit later and probably again a different environment.
1
0
113
2w
The base messages extension template builds but won't install or load
I am on a fresh install of Xcode 15.3 on macOS 14.4 (23E214). I created an iMessage App template and signed it with my personal team's certificate. When I click the run button, it successfully builds and opens the simulator to the Messages app but does not open the compact extension view (or install the extension such that it shows up in the More messages extension list). This reproduces on my older laptop (same version of Xcode) as well as my friend's (also same version of Xcode). Of note: The IceCreamBuilder app installs and runs correctly with no modifications I have not provided any icons for the messages extension The iMessage App template comes with an empty main app that does not install on the home screen The only console output that seems to differ from when I run the IceCreamBuilder is this message, which appears after a couple seconds of running the project: unhandled process MobileSMS Type: Error | Timestamp: 2024-03-09 00:41:07.763631-05:00 | Process: MobileSMS | Library: CoreParsec | Subsystem: com.apple.parsec | Category: CoreParsec | TID: 0xff097
3
0
560
2w
Exhausted WidgetKit Timeline Refreshes during Development
I've been developing widgets for an app and have been making frequent changes to the views to try different things out. Maybe I should be using previews for this, but I've been testing on simulators and my iPhone. I've found that after some point, my code all of a sudden stops affecting the widgets on my physical iPhone and on every simulator device, even after restarts of my laptop, wipes of the simulators, etc. And I'm not able to continue development until the next day. It seems like I'm hitting the hard limit for timeline requests in a day, but I feel like that shouldn't apply to simulators or should be refreshed when reinstalling for development? Thanks.
1
0
199
3w
Simulator Not Working
I've recently installed x code 15.3, but when I try and open simulator I am unable to select a device. When I navigate through the top menu a few item are active. One of these (active menu item) is New Simulator: I've tried to add a new simulator. Enter a name, selected a device type, but the drop down menu for OIS Version is not populating. I am leaving paired apple watch off. When I click create nothing happens. Open Simulator is an option, but there does not list any device when the arrow is clicked. Any suggestion? Thanks, Ed.
2
0
184
3w
iOS 17.x not installed
Hi all. I have a problem related to Xcode. Xcode says "iOS 17.2 simulator" is not installed, but I have been using this simulator for a long time and have installed the necessary SDKs. The problem has also been occurring for my colleagues since May 1, 2024. Restarting the Mac helps (there is no problem in Xcode after restarting Mac), but after reopening Xcode this problem repeats again. macOS 14.3.1 (23D60) Xcode 15.2 (15C500b)
10
2
1.6k
4w
Xcode 15 beta 5 – iOS 17 Simulator runtime not available
I downloaded Xcode 15 beta 5 and I'm trying to work on my app, but it's having a problem with the simulator. It can't find the runtime I guess. This is the first time I've ran into this. When I try to run, this is what I get: The com.apple.CoreSimulator.SimRuntime.iOS-17-0 simulator runtime is not available. runtime profile not found using "System" match policy Download the com.apple.CoreSimulator.SimRuntime.iOS-17-0 simulator runtime from the Xcode Settings. Not sure what to do here. I also installed the latest iOS 17 developer beta on my device and Xcode doesn't work with that either. I can't help but think the development team forgot something here.
13
8
8.8k
4w